-
-
Notifications
You must be signed in to change notification settings - Fork 549
Add JsonLibraryVersion and generate JsonStringEnumMemberNameAttriute for >= 9.0, EnumMemberAttribute otherwise #1865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…bute as fallback & tests
|
I think the best approach should be to control both attributes independently, from the configuration. Something like new configuration switches named Then users can opt-in to use the new Additionally, users can opt-out of the old Note that the tests only asserts that the produced code compiles ( |
|
Yes sorry, its actually a bug in the generator. The EnumValue is actually worthless and can also be removed for STJ, right? In theory yes someone could have implemented a global custom converter |
|
After investigation, the attribute was really working because in NSwag we generate this special converter which handles this correctly. So this was a big breaking change which this PR reverts. |
Closes #1738
Reverts #1864
and adds a JsonLibraryVersion config instead.